package him.action.board;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import him.action.Action;
import him.action.ActionForward;
import him.dto.bbs.NoticeDTO;
import him.service.NoticeBoardService;
import him.serviceimple.NoticeBoardServiceImple;

public class NoticeUpdateBfAction implements Action {

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		ActionForward actforward = new ActionForward();
		NoticeBoardService service = NoticeBoardServiceImple.getInstance();
		NoticeDTO dto = new NoticeDTO();
		
		int noticeseq = Integer.parseInt(request.getParameter("noticeseq"));
		dto.setNoticeseq(noticeseq);
		
		dto = service.getNoticeDetail(dto);
		
		request.setAttribute("dto", dto);
		actforward.setUrl("noticeupdatebf");
		
		return actforward;
	}

}
